package com.ans.dragoncloud.service;

import com.ans.dragoncloud.mapper.StudentMapper;
import com.ans.dragoncloud.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentService {

    @Autowired
    private StudentMapper mapper;

    public Student getStudentById(Integer id) {
        return mapper.selectByPrimaryKey(id);
    }

    public List<Student> getAllStudents() {
        return mapper.selectAll();
    }
}
